﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace StoryWriter
{
    /// <summary>
    /// Interaction logic for HTMLEditor.xaml
    /// </summary>
    public partial class HTMLEditor : UserControl
    {
        #region Constructors

        public HTMLEditor()
        {
            InitializeComponent();

            TextRange tr = new TextRange(
                  richTextBox.Document.ContentStart,
                  richTextBox.Document.ContentEnd);
        }

        #endregion

        private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            if (e.Command == EditingCommands.ToggleBold)
            {
                //MessageBox.Show(e.OriginalSource.GetType().ToString());
                boldToggleButton.IsChecked = !boldToggleButton.IsChecked;
                //e.CanExecute = false;
            }
        }

        #region Event Handlers

        #endregion
    }
}